#ifndef GOTOCONTROL_H
#define GOTOCONTROL_H

#include <QDialog>
#include <qicon.h>
#include "gotolist.h"


class GoToEdit;
class QListWidget;
class ProjectManager;

class GoToControl : public QDialog
{
    Q_OBJECT
public:
    explicit GoToControl(QWidget *parent = 0);
    ~GoToControl();
    void setProjectManager(ProjectManager * aManager);
    void updateList();
    void setAvalaibleHeight(int aHeight);
    void showEvent(QShowEvent *e);
    void updateLayout();
    void keyPressEvent(QKeyEvent *e);
signals:
    void itemChosen(QString aLink);
public slots:
    void onTextChanged(QString aText);
    void onItemHovered(QListWidgetItem *aItem);
    void onItemChosen(QListWidgetItem *aItem);
    void onReturnPressed();
private:
    GoToEdit * m_gotoEdit;
    GoToList * m_dropDownMenu;
    ProjectManager * m_projectManager;
    int m_avalaibleHeight;
    QIcon m_luaImage;
    QIcon m_globalImage;
};

#endif // GOTOCONTROL_H
